import os
import sys

import pytest
from testcases.conftest import user_test_data

BASE_PATH = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
sys.path.append(BASE_PATH)


@pytest.fixture(scope="function")
def testcase_data(request):
    testcase_name = request.function.__name__
    return user_test_data.get(testcase_name)